<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h1>表单提交</h1>
    <form action="">
        <div>
            <label for="name">用户名：</label>
            <input type="text" name="name" id="name">
        </div>
        <div>
            <label for="pwd">密码：</label>
            <input type="password" name="pwd" id="pwd">
        </div>
        <button>提交</button>
        <!-- <input type="submit" value="提交"> -->
        <!-- e.preventDefault() -->
        <!-- 阻止按钮的提交事件e -->
    </form>
</body>

</html>1